Skip to content

docs(plan): double-quoted strings as sugar for [ '...' ]#37

Open
Hypercubed wants to merge 8 commits intomainfrom
cursor/-bc-3e6e2c69-0ee6-4b16-b17f-3f14d2cca3d1-512e
Open

docs(plan): double-quoted strings as sugar for [ '...' ]#37
Hypercubed wants to merge 8 commits intomainfrom
cursor/-bc-3e6e2c69-0ee6-4b16-b17f-3f14d2cca3d1-512e

Conversation

@Hypercubed
Copy link
Copy Markdown
Owner

@Hypercubed Hypercubed commented Apr 7, 2026

Dart (updated)

  • tokenize(): whitespace-only split (RegExp(r'\s+')), no string rewriting.
  • ev(): when a token is a double-quoted string ("..."), prepend ['[', ...code unit strings..., ']'] via pushFrontQueueAll (same model as Python/Ruby run()).

Check: cd dart && dart run tool/check_double_quote.dart

Other runtimes unchanged from prior PR commits (TS/Go/Racket compilers; Python/Ruby expand in run()).

Open in Web Open in Cursor 

cursoragent and others added 8 commits April 7, 2026 03:14
Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
…e path

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
Double-quoted tokens use the same unescapeString pipeline and per-character
pushes as single-quoted literals (no implicit 0). Add Deno compile tests and
a TAP .ffp suite under ff/lib/string/__tests__.

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
Emit BRA, per-character pushes (same as single-quoted), then KET so "hi"
is a quotation; eval matches bare 'hi'. Accept standalone [ and ] tokens
so [ 'hi' ] tokenizes like the sugar form.

Update Deno IR tests, TAP tests (seq= vs [ 'hi' ], eval vs chars), and plan
implementation status.

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
Go: compile "..." as BRA + per-char pushes + KET; accept [ and ] tokens.
Add compiler tests mirroring TS behavior.

Racket: lex double-quoted strings (STR-DQ), standalone [ ] (BRA/KET); share
ff-unescape with single-quoted strings. Extend brag grammar and compile/
runner/expander macros for STR-DQ and brackets.

Update string plan implementation status.

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
Expand "..." at tokenize time to '[', Unicode code units as integers,
and ']', matching other compilers' BRA/push/KET shape.

- python/execute.py, ruby/execute.rb: tokenizer flat_map expansion
- dart/bin/dart.dart: tokenize() same expansion

Add small verification scripts (python test_double_quote_tokenize.py,
ruby test_double_quote_stdout.rb, dart run tool/check_double_quote.dart).
Update string plan implementation list.

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
…enizer

Keep "..." as a single string token from tokenize(); prepend [ char-codes ]
to the queue when run() processes it. Update plan doc and Python self-check.

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
Remove string expansion from tokenize(); handle "..." in ev() like
Python/Ruby by prepending [ code-unit tokens ] to the queue.
Update check script and plan doc.

Co-authored-by: Jayson Harshbarger <Hypercubed@users.noreply.github.com>
@Hypercubed Hypercubed marked this pull request as ready for review April 7, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants